<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>依据接口结构进行布局</title>
    <style>
        .a {
            color: red;
            display: flex;
        }

        .b {
            color: blue;
        }
    </style>
    <script src="./框架相关的js/vue.js"></script>
</head>

<body>

    <div id="app">
        <button @click="fn">确定</button>
        <div v-for="(item,index) in form" :key="index">
          是：  <input type="radio" v-model="item.modelName" :name="item.title" value="0" @click="change($event,index,item)"></input>
          一般：<input type="radio" v-model="item.modelName" :name="item.title" value="1" @click="change($event,index,item)"></input>
          否：  <input type="radio" v-model="item.modelName" :name="item.title" value="2" @click="change($event,index,item)"></input>
        </div>
        </el-form>
    </div>

    <script>

        new Vue({
            el: '#app',
            data: {
                form: [
                    {
                        title: "选项一",
                        modelName: 'h',
                        a:'aa'
                    },
                    {
                        title: "选项二",
                        modelName: 'a',
                        a:'bb'
                    },
                    {
                        title: "选项三",
                        modelName: 'a',
                        a:'cc'
                    }],
                score_item_list: null
            },
            methods: {
                change(item,a,b){
                    console.log(a,b,'///////////');
                },
                fn() {
                    let obj={}
                    this.form.forEach(item=>{
                        obj[item.a]=item.modelName
                    })
                    console.log(obj,'???111111');
                    console.log(this.form,'?????');
                }
            },
            mounted() {
               
            },
        })

    </script>
</body>

</html>